﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cmd
{
    public class CommandLineOptionCollection : List<CommandLineOption>
    {
        public CommandLineOption GetOption(string command)
        {
            return this.Where(item => item.Command == command || item.PropertyName == command || item.Alias == command).FirstOrDefault();
        }

        //public new virtual void Add(CommandLineOption item)
        //{
        //    base.Add(item);
        //    //throw new NotSupportedException("Cannot add items using this method. Use 'AddOption' instead.");
        //}

        //public virtual void AddOption(CommandLineOption item, List<OptionGroupAttribute> optGroups)
        //{
        //    base.Add(item);
        //}

        public CommandLineOptionCollection()
        {

        }
    }
}
